Skip to main content

Full text of "UMI Reference Card For The VIC-20 (1982)(UMI)"

See other formats


UMI REFERENCE CARD 
FOR THE VIC SO* 

UNITED MICROWARE INDUSTRIES, INC. 3431 H Pomona Blvd., Pomona, CA 91768 VIC20 is a registered trademark of Commodore Business Machines 



USER CALLABLE KERNAL ROUTINES 



NAME 



ADDRESS 



FUNCTION 



ACPTR 


$FFA5 


CHKIN 


$FFC6 


CHKOUT 


$FFC9 


CHRIN 


$FFCF 


CHROUT 


SFFD2 


CIOUT 


SFFA8 


CLALL 


$FFE7 


CLOSE 


$FFC3 


CLRCHN 


$FFCC 


GETIN 


$FFE4 


IOBASE 


$FFF3 


LISTEN 


$FFB1 


LOAD 


$FFD5 


MEMBOT 


SFF9C 


MEMTOP 


$FF99 


OPEN 


$FFC0 


PLOT 


$FFF0 


RDTIM 


SFFDE 


READST 


$FFB7 


RESTOR 


$FF87 


SAVE 


$FFD8 


SCNKEY 


$FF9F 


SCREEN 


SFFED 


SECOND 


$FF93 


SETLFS 


$FFBA 


SETMSG 


$FF90 


SETNAM 


$FFBD 


SETTIM 


SFFDB 


SETMO 


$FFA2 


STOP 


$FFE1 


TALK 


$FFB4 


TKSA 


$FF96 


UDTIM 


$FFEA 


UNLSN 


$FFAE 


UNTLK 


SFFAB 


VECTOR 


$FF84 



input byte from IEEE bus 

Open logical file in R(X) for input 

Open logical file in R(X) for output 

Input character from channel 

Output byte in R(A) to channel 

Output byte in R(A) to IEEE (serial) bus 

Close all files 

Close logical file in R(A) 

Close all open channels and restore default channels 

Get character from keyboard; character is in R(A) 

Returns address of I/O page in R(X), R(Y) 

Command device # in R(A) to listen with attention 

Load from device; R(A)=0 for load, 1 for verify 

Sets bottom of memory to R(X), R(Y) if carry clear 

reads bottom of memory in R(X), R(Y) if carry set 

Sets top of memory to R(X), R(Y) if carry clear 

reads bottom of memory in R(X), R(Y) if carry set 

Open file determined by SETLFS and SETNAM 

Move cursor to R(X), R(Y) if carry clear 

read cursor position into R(X), R(Y) is carry set 

Read time (hhmmss) into R(A), R(X), R(Y) 

Read current I/O status and return in R(A) 

Restore system default vectors 

Save from MEMBOT to R(X), R(Y) 

Scan keyboard; if key pressed, store in buffer 

Read organization of screen into R(X), R(Y) 

Set secondary address after call to LISTEN 

Set logical file #, device #, and secondary address 

Control printing of messages (uses bits 6, 7 of R(A)) 

Set filename — R(A)=length, R(X), R(Y)=lo, hi pointer to filename 

Set time 

Set IEEE (serial) timeouts 

Check for stop key 

Command device in R(A) to talk 

Set secondary address for TALK (sa in R(A)) 

Update time 

Unlisten IEEE (serial) device 

Untalk IEEE (serial) device 

Change system vectors 



BASIC TOKENS 


128 


END 


167 


THEN 


129 


FOR 


168 


NOT 


130 


NEXT 


169 


STEP 


131 


DATA 


170 


+ 


132 


INPUTS 


171 


- 


133 


INPUT 


172 




134 


DIM 


173 


/ 


135 


READ 


174 


♦ 


136 


LET 


175 


AND 


137 


GOTO 


176 


OR 


138 


RUN 


177 


> 


139 


IF 


178 


= 


140 


RESTORE 


179 


< 


141 


GOSUB 


180 


SGN 


142 


RETURN 


181 


INT 


143 


REM 


182 


ABS 


144 


STOP 


183 


USR 


145 


ON 


184 


FRE 


146 


WAIT 


185 


POS 


147 


LOAD 


186 


SQR 


148 


SAVE 


187 


RND 


149 


VERIFY 


188 


LOG 


150 


DEF 


189 


EXP 


151 


POKE 


190 


COS 


152 


PRINT # 


191 


SIN 


153 


PRINT 


192 


TAN 


154 


CONT 


193 


ATN 


156 


LIST 


194 


PEEK 


157 


CLR 


195 


LEN 


158 


CMD 


196 


STR$ 


159 


SYS 


197 


VAL 


160 


OPEN 


198 


ASC 


161 


CLOSE 


199 


CHR$ 


162 


GET 


200 


LEFTS 


163 


NEW 


201 


RIGHTS 


164 


TAB < 


202 


MID$ 


165 


TO 


203 


- 254 unused 


166 


SPC< 


255 


TT 



PEEKS AND POKES 



COLOR 

POKE 646.X 
POKE 36879.X 

LIGHT PEN 

PEEK (36870) 
PEEK (36871) 

KEYBOARD 

POKE 650,128 
PEEK (203) 
PEEK (198) 



Set current color code 

Set screen and border color 

Horizontal position of light pen 
Vertical position of light pen 

Make all keys repeat 

Which key pressed (64 if none) 

# of character in keyboard buffer 



SOUND 


POKE 


36874.X 


POKE 


36875.X 


POKE 


36876.X 


POKE 


36877.X 


POKE 


36878.X 


USER PORT 


POKE 


37138, O 


POKE 


37136, X 


POKE 


37136, X 



Set frequency of low oscillator 
Set frequency of mid oscillator 
Set frequency of high oscillator 
Set frequency of noise oscillator 
Set volume 



Set all bits for input 
Set all bits for output 
Data register (input/output) 



RS - 232 REGISTERS 



CONTROL REGISTER 



COMMAND REGISTER 



BITS 


7 




6 


5 




4 


T 












STOP BITS 






0- 1 STOP BIT 
1 - 2 STOP BITS 










WORD LENGTH 


BITS 


DATA WORD LENGTH 


6 


5 





y 


8 BITS 


2 




7 


1 


i 


6 


1 


1 


5 



3 2 


\f? 




| BAUD RATE 


i 


/ 


A 




50 


? 


ft 




y 


75 


X 


/ 






110 


3 




4 


/ 


134.5 


1 




/ 




150 


% 




1 


/ 


300 


z 




1 


1 


600 




K 


£ 


> 


1200 


1 


M 


y 




1800 


1 


w 




y 


2400 



BASIC SYNTAX: OPEN#lf, 2, 0, "<control registerXcommand register>" 
If — Normal logical file id (1 - 255). If > 127 then linefeed follows carriage return 
<control register> — Single byte character required to specify baud rate. 
<control register> — Single byte character NOT required. 



PARITY OPTIONS 




[ 4] m a a ia 



OPERATIONS 



Parity disabled, none 
generated/received 



Odd parity 
Receiver/transmitter 



Even parity 
Receiver/transmitter 



Mark transmitted 
Parity check disabled 



Space transmitted 
Parity check disabled 



DUPLEX 



FULL DUPLEX 

1 HALF DUPLEX 



HANDSHAKE 



- 3 LINE 

1 - X LINE 



□ 



NOT USED 



SCREEN AND BORDER COLOR COMBINATIONS 



POKE 36879, X 



BORDER 



SCREEN 





BLK 


WHT 


RED 


CYAN 


PUR 


GRN 


BLU 


YEL 


ORANGE 


LT. OR 


PINK 


LT. CYAN 


LT. PUR 


LT. GRN 


LT. BLU 


LT. YEL 


BLACK 


8 


9 


10 


11 


12 


13 


14 


15 


136 


152 


168 


184 


200 


216 


232 


248 


WHITE 


24 


25 


26 


27 


28 


29 


30 


31 


137 


153 


169 


185 


201 


217 


233 


249 


RED 


40 


41 


42 


43 


44 


45 


46 


47 


138 


154 


170 


186 


202 


218 


234 


250 


CYAN 


56 


57 


58 


59 


60 


61 


62 


63 


139 


155 


171 


187 


203 


219 


235 


251 


PURPLE 


72 


73 


74 


75 


76 


77 


78 


79 


140 


156 


172 


188 


204 


220 


236 


252 


GREEN 


88 


89 


90 


91 


92 


93 


94 


95 


141 


157 


173 


189 


205 


221 


237 


253 


BLUE 


104 


105 


106 


107 


108 


109 


110 


111 


142 


158 


174 


190 


206 


222 


238 


254 


YELLOW 


120 


121 


122 


123 


124 


125 


126 


127 


143 


159 


175 


191 


207 


223 


239 


255 



TABLE OF MUSICAL NOTES 



APPROX. APPROX. APPROX. APPROX. 
NOTE VALUE NOTE VALUE NOTE VALUE NOTE VALUE 



C 

c# 

D 

D# 

E 

F 

F# 

G 

G# 

A 



135 
143 
147 
151 
159 
163 
167 
175 
179 
183 



A# 

B 

C 

C# 

D 

D# 

E 

F 

F# 

G 



187 
191 
195 
199 
201 
203 
207 
209 
212 
215 



G# 

A 

A# 

B 

C 

C# 

D 

D# 

E 

F 



217 
219 
221 
223 
225 
227 
228 
229 
231 
232 



SPEAKER COMMANDS: 



WHERE X CAN BE: 



POKE 36878, X 
POKE 36874, X 
POKE 36875, X 
POKE 36876, X 
POKE 36877, X 



Oto 15 
128 to 255 
128 to 255 
128 to 255 
128 to 255 



F# 

G 

G# 

A 

A# 

B 

C 

C# 



233 
235 
236 
237 
238 
239 
240 
241 



FUNCTION 



sets volume 
plays tone 
plays tone 
plays tone 
plays "noise" 



VIC MEMORY MAP 




SCREEN RAM 



4K RAM 



3K 

EXPANSION 
RAM 



1K RAM 



I/03 



I/02 



COLOR 



4K I I/O0 

CHARACTER 

ROM 



$IFFF 
$IEOO 

$1000 
$0400 



$9C00 
$9800 



* $9100 
$9000 
$8000